const controllers = require("../controllers/teacher");
const authorization = require('../middleware/authorization');
const adminAuthorization = require('../middleware/adminAuthorization');
module.exports = router => {
    // router.prefix('/');
    //小程序的
    router.get('/teacher/list/:storeId', authorization(), controllers.list1);
    router.get('/teacher/detail/:id', authorization(), controllers.detail);
    //管理品台的
    router.get('/admin/teacher/:storeId/list', adminAuthorization(), controllers.list);
    router.post('/admin/teacher', adminAuthorization(),controllers.create);
    router.put('/admin/teacher', adminAuthorization(),controllers.update);
    router.delete('/admin/teacher/one/:id', adminAuthorization(), controllers.delete);
};
